package com.zjw.jdbc.util;

import java.sql.Connection;
import java.sql.SQLException;

import com.mchange.v2.c3p0.ComboPooledDataSource;

/**
 * c3p0 util
 * @author zjw
 *
 */
public class C3P0Util {
	private static ComboPooledDataSource cpds;
	
	static{
		cpds = new ComboPooledDataSource();
	}

	public static Connection getConnection() throws SQLException{
		
		return cpds.getConnection();
	}
	
	public static ComboPooledDataSource getDataSource(){
		return cpds;
	}
}
